<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>

<body>
  <div id="app">
    <alert-box>
      hello world
    </alert-box>
    <custom-button>确定</custom-button>
    <custom-button>删除</custom-button>
    <custom-button>取消</custom-button>
    <custom-button></custom-button>
  </div>
  <script>

    Vue.component('alert-box', {
      template: `
       <div>
       <span>alert box</span>
         <slot></slot>
       </div>
      `
    })

    Vue.component('custom-button',{
      template:`
      
      <button><slot>提交</slot></button>
      
      `
    })

    var vm = new Vue({
      el: "#app"
    })
  </script>
</body>

</html>